package edu.iss.demo.model;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the leave_application database table.
 * 
 */
@Entity
@Table(name="leave_application")
@NamedQuery(name="LeaveApplication.findAll", query="SELECT l FROM LeaveApplication l")
public class LeaveApplication implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="leave_id")
	private String leaveId;

	@Temporal(TemporalType.DATE)
	@Column(name="apply_date")
	private Date applyDate;

	@Temporal(TemporalType.DATE)
	@Column(name="approve_date")
	private Date approveDate;

	@Column(name="employee_comment")
	private String employeeComment;

	@Temporal(TemporalType.DATE)
	@Column(name="from_date")
	private Date fromDate;

	@Column(name="manger_comment")
	private String mangerComment;

	private String status;

	@Temporal(TemporalType.DATE)
	@Column(name="to_date")
	private Date toDate;

	//bi-directional many-to-one association to Employee
	@ManyToOne
	@JoinColumn(name="employee_id")
	private Employee employee;

	//bi-directional many-to-one association to LeaveType
	@ManyToOne
	@JoinColumn(name="leave_code")
	private LeaveType leaveType;

	public LeaveApplication() {
	}

	public String getLeaveId() {
		return this.leaveId;
	}

	public void setLeaveId(String leaveId) {
		this.leaveId = leaveId;
	}

	public Date getApplyDate() {
		return this.applyDate;
	}

	public void setApplyDate(Date applyDate) {
		this.applyDate = applyDate;
	}

	public Date getApproveDate() {
		return this.approveDate;
	}

	public void setApproveDate(Date approveDate) {
		this.approveDate = approveDate;
	}

	public String getEmployeeComment() {
		return this.employeeComment;
	}

	public void setEmployeeComment(String employeeComment) {
		this.employeeComment = employeeComment;
	}

	public Date getFromDate() {
		return this.fromDate;
	}

	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}

	public String getMangerComment() {
		return this.mangerComment;
	}

	public void setMangerComment(String mangerComment) {
		this.mangerComment = mangerComment;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getToDate() {
		return this.toDate;
	}

	public void setToDate(Date toDate) {
		this.toDate = toDate;
	}

	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public LeaveType getLeaveType() {
		return this.leaveType;
	}

	public void setLeaveType(LeaveType leaveType) {
		this.leaveType = leaveType;
	}

}